import javax.swing.*;

/**
 * @classname 绘制状态栏
 * @Author 姬如千泷
 * @Date 2021/5/15  21:32
 * @Version 1.0
 */
public class MyState extends JLabel {
    public int ms_x=0;
    public MyState(MyTown myTown){
        init();
        myTown.add(this,1);
    }
    public MyState(int z,MyTown myTown){
        ms_x=-z;
        init();
        myTown.add(this,1);
    }
    public MyState(MyMap myMap){
        init();
        myMap.add(this,0);
    }
    public void init(){
        setIcon(DateCenter.state);
        setBounds(ms_x,720,1200,130);
    }
    public void move(int x){
        ms_x+=x;
        setBounds(ms_x,720,1200,130);
    }
}
